package com.qinglei.recoup.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.ibatis.annotations.Case;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 床位健康数据日统计表
 *
 * @author syp
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_bed_health_daily_statistics")
@ApiModel(value = "BedHealthDailyStatistics对象", description = "床位健康数据日统计表")
public class BedHealthDailyStatistics implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "床位ID")
    private Integer bedId;

    @ApiModelProperty(value = "统计日期")
    private LocalDate statisticsDate;

    @ApiModelProperty(value = "睡眠总时长 单位分钟")
    private Integer sleepDuration;

    @ApiModelProperty(value = "深睡时长 单位分钟")
    private Integer deepSleepDuration;

    @ApiModelProperty(value = "浅睡时长 单位分钟")
    private Integer lightSleepDuration;

    @ApiModelProperty(value = "清醒时长 单位分钟")
    private Integer clearSleepDuration;

    @ApiModelProperty(value = "离床时长 单位分钟")
    private Integer outBedDuration;

    @ApiModelProperty(value = "离床次数")
    private Integer outBedNum;

    @ApiModelProperty(value = "体动次数")
    private Integer turnOverNum;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime modifyTime;

    @ApiModelProperty(value = "睡眠得分")
    private Long  score;

    private Integer resultFlag;  //数据解析标志位(0:数据解析成功；1:整晚 在床时间过短；2:数据异常,算法不进行 解算；大于10的数值是丢包率太高 ）

    @TableField(exist = false)
    private String resultFlagStr;

    @ApiModelProperty(value = "08-00-00,上床时间(几点几分几秒)")
    private String  getBedIdx;

    @ApiModelProperty(value = "08-00-00起床时间(几点几分几秒)")
    private String  leaveBedIdx;

    @ApiModelProperty(value = "08-00-00入睡时间(几点几分几秒)")
    private String  sleepStIdx;

    @ApiModelProperty(value = "08-00-00晨醒时间(几点几分几秒)")
    private String  sleepEdIdx;

    @ApiModelProperty(value = "有效睡眠时长/min")
    private String  sleepLenValidMin;

    @ApiModelProperty(value = "睡眠效率")
    private Integer sleepEff;

    @ApiModelProperty(value = "最低呼吸率")
    private Integer breathMin;

    @ApiModelProperty(value = "最高呼吸率")
    private Integer breathMax;

    @ApiModelProperty(value = "平均呼吸率")
    private Integer breathMean;

    @ApiModelProperty(value = "最低心率")
    private Integer heartMin;

    @ApiModelProperty(value = "最高心率")
    private Integer heartMax;

    @ApiModelProperty(value = "平均心率")
    private Integer heartMean;


}
